package com.xbongbong.pro.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.enums.FieldTypeEnum;
import lombok.Getter;

/**
 * 打印特殊字段枚举
 *
 * @author 徐俊杰
 * @version v1.0
 * @date 2019/12/3 14:37
 * @since v1.0
 */
@Getter
public enum PrintSpecialAttrEnum {
    /**
     * 回款金额明细
     */
    PAYMENT_SHEET_AMOUNT_DETAIL("detail_1", "enum.printSpecialAttr.attrName.payment_sheet_amount_detail", "amountDetail", FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 核销金额明细
     */
    PAYMENT_SHEET_WRITE_OFF_AMOUNT_DETAIL("detail_2", "enum.printSpecialAttr.attrName.payment_sheet_write_off_amount_detail", "writeOffAmountDetail", FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 开票金额明细
     */
    INVOICE_TOTAL_MONEY_DETAIL("detail_1", "enum.printSpecialAttr.attrName.invoice_total_money_detail", "invoiceTotalMoneyDetail", FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 付款金额明细
     */
    PAY_SHEET_AMOUNT_DETAIL("detail_1", "enum.printSpecialAttr.attrName.pay_sheet_amount_detail", "amountDetail", FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 付款核销金额明细
     */
    PAY_SHEET_WRITE_OFF_AMOUNT_DETAIL("detail_2", "enum.printSpecialAttr.attrName.pay_sheet_write_off_amount_detail", "writeOffAmountDetail", FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 进项开票金额明细
     */
    INVOICE_PURCHASE_TOTAL_MONEY_DETAIL("detail_1", "enum.printSpecialAttr.attrName.invoice_total_money_detail", "invoicePurchaseTotalMoneyDetail", FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 工单动态
     */
    WORK_ORDER_DYNAMIC("workOrderDynamic","enum.printSpecialAttr.attrName.work_order_dynamic","workOrderDynamic",FieldTypeEnum.SUB_FORM.getType()),
    /**
     * 工单进展
     */
    WORK_ORDER_PROCESS("workOrderProgress","enum.printSpecialAttr.attrName.work_order_process","workOrderProgress",FieldTypeEnum.SUB_FORM.getType()),

    /**
     * 对账单
     */
    CUSTOMER_STATEMENT_DETAIL("detail_1","enum.printSpecialAttr.attrName.customer_statement_detail","customerStatementDetail",FieldTypeEnum.SUB_FORM.getType()),

    /**
     * 服务项目
     */
    SERVICE_PROJECT("serviceProject","enum.printSpecialAttr.attrName.service_project","serviceProject",FieldTypeEnum.SUB_FORM.getType()),
    ;

    private String attr;
    private String attrName;
    private String saasAttr;
    private Integer fieldType;

    PrintSpecialAttrEnum(String attr, String attrName, String saasAttr, Integer fieldType) {
        this.attr = attr;
        this.attrName = attrName;
        this.saasAttr = saasAttr;
        this.fieldType = fieldType;
    }

    public String getAttrName() {
        return I18nMessageUtil.getMessage(attrName);
    }
}
